package com.niiwoo.activity.stage.enums.inviterBuddy;

public enum ProjectTypeEnum {

    SPEED_LOAD(1, "极速借"), // 个人极速借
    CONSUMEPTION_LOAD(2, "机构极速借"), // 机构极速借
    CARD_NIU(4,"卡牛"),
    XIAOYI_LOAN(8, "小易贷"),
    SOCIAL_SECURITY_LOAN(9, "社保贷"),
    CREDIT_CARD_LOAN(10, "信用卡贷"),
    
    ORG_SPEEDLOAN_NEW(11, "极速借机构(新)"), // 新极速借机构类型
    DECORATION_LOAN(12, "装修借"),
    
    CONSUME_LOAN(14, "消费贷")//13已被债权标占用
    ;

    private final Integer value;
    private final String desc;

    private ProjectTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer value() {
        return value;
    }

    public String desc() {
        return desc;
    }

    public static ProjectTypeEnum findForValue(Integer type) {
        if (type == null) {
            return null;
        }
        for (ProjectTypeEnum en : ProjectTypeEnum.values()) {
            if (en.value.intValue() == type.intValue()) {
                return en;
            }
        }
        return null;
    }
}
